package com.thiny.android.app.tnote.adapter;

import java.util.List;

import android.content.Context;
import android.widget.BaseAdapter;

public abstract class BasicAdapter <T> extends BaseAdapter{

	private Context mContext;
	private List<T> mList;
	
	
	public BasicAdapter(Context context, List<T> list) {
		mContext = context;
		mList = list;
	} 
	
	protected Context getContext() {
		return mContext;
	}
	
	public int getCount() {
		if (mList != null && !mList.isEmpty()) {
			return mList.size();
		} 
		return 0;
	}

	public Object getItem(int position) {
		if (mList != null && !mList.isEmpty()) {
			return mList.get(position);
		} 
		return null;
	}

	public long getItemId(int position) { 
		return position;
	}
 

	 

}
